﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class EnergyShotPrioritizedFollowPosition : PrioritizedFollowPosition
{
    private EnergyShotManager energyShotManager;

    public EnergyShotPrioritizedFollowPosition(EnergyShotManager energyShotManager)
    {
        this.energyShotManager = energyShotManager;
    }

    public override void Update(float time)
    {
        if (!energyShotManager.IsDestroyed)
        {
            Position = energyShotManager.transform.position;
            Priority = PrioritizedFollowPosition.ENERGY_SHOT;
        }
        else
        {
            Priority = PrioritizedFollowPosition.EXPIRED;
        }
    }
}
